package oj0413.oj0413_03;

import java.util.Scanner;

public class Main {
    public static void f(String s,String t){
        int n = 0;
        int time = s.length() - t.length();
        for (int i = 0; i < time + 1; i++) {
            int k = i,j = 0;
            while (j < t.length()){
                if (s.charAt(k) == t.charAt(j)){
                    k++;
                    j++;
                }else {
                    break;
                }
            }
            if (j == t.length()){
                n++;
                System.out.print((i + 1) + ",");
                i = i+j-1;
            }
        }
        if (n == 0){
            System.out.print(-1);
        }
        System.out.println();
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String t = sc.next();
        f(s, t);
        sc.close();
    }
}
